package com.czl.base.data.bean.tengyun

import java.io.Serializable
import com.blankj.utilcode.util.TimeUtils

data class ApproveBean(
    val businessId: String?,
    val content: String?,
    val procInstId: String?,
    val processStatus: Int?,
    val relationId: String?,
    val processUpdate: Long?,
    val processUpdateStr: String?,
    val submitCompanyId: Int?,
    val submitCompanyName: String?,
    val submitCompanyShortName: String?,
    val submitDate: Long?,
    var submitDateStr: String?,
    val submitOrgName: String?,
    val submitTname: String?,
    val title: String?,
    val applyTnameStr: String?,
    val nodeName: String?,
    var taskUserId: String?,
    var status: Int?
) : Serializable{
    fun getProcessStatusStr(): String {
        if (processStatus != null) {
            if (processStatus == 1 && status == 1){
                return "已审核"
            }
            return ProcessStatusList[processStatus]
        }
        return ""
    }

    fun submitDateToStr (submitDate: Long?) : String {
        if(submitDate!=null) {
            return TimeUtils.millis2String(submitDate, "yyyy-MM-dd")
        }
        return ""
    }
}
var ProcessStatusList : List<String> = arrayListOf("审批驳回","待审批","审批通过","已撤销")
//Byte TASK_NOT_STATUS = 0;// 未执行
//Byte TASK_STATUS_ADOPT = 1;// 已通过
//Byte TASK_USEING_STATUS = 2;// 执行中
//Byte TASK_USEING_HANG_UP = 3;// 已挂起
//Byte TASK_STATUS_EXEC = 4;// 任务已执行 （但不是该人执行的任务）
//Byte TASK_STATUS_CANCEL = 5;// 已撤销
//        /**
//         * 流程状态
//         */
//        Byte PROCESS_STATUS_STOP = 0; // 已终止
//        Byte PROCESS_STATUS_USEING = 1; // 进行中
//        Byte PROCESS_STATUS_END = 2; // 已结束
//        Byte PROCESS_STATUS_CANCEL = 3;// 已撤销